{include file="public/header" /}
<style>
    html {
        background-color: #F5F7F9 !important;
    }

    .layui-tab-title .layui-this {
        color: #1E9FFF !important;
        font-size: 15px !important;
        font-weight: bold;
    }
</style>
<body>
<form class="layui-form" id="form" action="{:url('save')}" lay-filter='form'>
    <div class="layui-fluid layui-anim layui-anim-downbit">
        <div class="layui-card">
            <div class="layui-card-body" style="padding: 15px;">
                {include file="public/arguments" /}
                <input type="hidden" name="id" id="id" value="{$info?$info.id:''}"/>
                <div class="layui-tab">
                    <ul class="layui-tab-title">
                        <li class="layui-this">商品信息</li>
                        <li>商品图片</li>
                        <li>商品详情</li>
                    </ul>
                    <div class="layui-tab-content">
                        <div class="layui-tab-item layui-show">
                            <div class="layui-form-item">
                                <label class="layui-form-label">商品名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="title" lay-verify="required" lay-reqtext="请输入商品名称"
                                           placeholder="请输入商品名称" class="layui-input" value="{$info?$info.title:''}"/>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">商品描述</label>
                                <div class="layui-input-block">
                                    <input type="text" name="describe" lay-verify="required" lay-reqtext="请输入商品描述"
                                           placeholder="请输入商品描述" class="layui-input" value="{$info?$info.describe:''}"/>
                                </div>
                            </div>
                            <div class="layui-form-item sunSelect" data-url="{:url('ProductCate/getCate')}" data-value="id" data-name="title">
                                <label class="layui-form-label">所属分类</label>
                                <div class="layui-input-inline">
                                    <select name="cate_1" id="cate_1" data-name="一级分类" lay-verify="required"
                                            lay-reqtext="请选择一级分类" data-id="{$info?$info.cate_1:''}"
                                            lay-filter="sunSelect"></select>
                                </div>
                                <div class="layui-input-inline">
                                    <select name="cate_2" id="cate_2" data-name="二级分类" lay-verify="required"
                                            lay-reqtext="请选择二级分类" data-id="{$info?$info.cate_2:''}"
                                            lay-filter="sunSelect"></select>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">市场价</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="market_price" lay-verify="required" lay-reqtext="请输入市场价格"
                                           placeholder="请输入市场价格" class="layui-input" value="{$info?$info.market_price:''}">
                                </div>
                                <div class="layui-form-mid layui-word-aux">元</div>

                                <label class="layui-form-label">会员价</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="price" lay-verify="required" lay-reqtext="请输入会员价格"
                                           placeholder="请输入会员价格" class="layui-input" value="{$info?$info.price:''}">
                                </div>
                                <div class="layui-form-mid layui-word-aux">元</div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">库存</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="stock" lay-verify="required" lay-reqtext="请输入商品库存"
                                           placeholder="请输入商品库存" class="layui-input" value="{$info?$info.stock:''}">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">销量</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="sales" placeholder="请输入商品销量"
                                           class="layui-input" value="{$info?$info.sales:'0'}">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">排序</label>
                                <div class="layui-input-inline">
                                    <input type="number" name="sort" placeholder="请输入排序"
                                           class="layui-input" value="{$info?$info.sort:'0'}">
                                </div>
                            </div>
                        </div>

                        <div class="layui-tab-item">
                            {include file="form/items/img" type='' /}
                        </div>

                        <div class="layui-tab-item">
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">详情</label>
                                <div class="layui-input-block">
                                    <div data-filed="content" id="editor—wrapper" class="wang-editor editor—wrapper"
                                         data-value='<?php echo isset($info)?$info["content"]:"";?>'>
                                        <input type="hidden" class="editor—content" name="content"
                                               value='<?php echo isset($info)?$info["content"]:"";?>'/>
                                        <div class="toolbar-container" id="toolbar-container-content">
                                            <!-- 工具栏 --></div>
                                        <div class="editor-container" id="editor-container-content">
                                            <!-- 编辑器 --></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    {include file="public/submit" /}
</form>
</body>
{include file="public/footer" /}
</html>